package com.zhixi.pattern.important.decoratorpattern.operation.decoratior;

import com.zhixi.pattern.important.decoratorpattern.operation.AbstractMilkTea;
import com.zhixi.pattern.important.decoratorpattern.operation.concreatecomponent.MilkTea;

/**
 * 装饰器
 *
 * @作者 ShuHaoNan
 * @邮箱 shuhaonan1@gmail.com
 * @时间 2020/11/17 15:16
 */
public abstract class Decorator implements AbstractMilkTea {

    private AbstractMilkTea milkTea;

    public Decorator(AbstractMilkTea milkTea) {
        this.milkTea = milkTea;
    }

    /**
     * 开始制作奶茶
     */
    @Override
    public void startMakeMilkTea() {
        this.milkTea.startMakeMilkTea();
    }

    /**
     * 结束制作奶茶
     */
    @Override
    public void endMakeMilkTea() {
        this.milkTea.endMakeMilkTea();
    }

}
